Completed
Pull Request — master (#234)
by
unknown
41s
created

findForm.js ➔ fillPassword   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 1 Features 0
Metric Value
cc 3
c 5
b 1
f 0
nc 4
nop 2
dl 0
loc 8
rs 9.4285

1 Function

Rating   Name   Duplication   Size   Complexity  
A findForm.js ➔ ... ➔ document.forEach 0 1 1
1
function fillPassword(user, password) {
2
    if(user){
3
        document.querySelectorAll('input[type=text], input[type=email]').forEach(function(x){x.value=user;});
4
    }
5
    if(password) {
6
        document.querySelectorAll('input[type=password]').forEach(function(x){ x.value=password;});
7
    }
8
}
9